package com.love.marriage.userBalanceInfo.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.binarywang.wxpay.bean.result.WxPayUnifiedOrderV3Result;
import com.love.marriage.orderInfo.vo.OrderInfoVo;
import com.love.marriage.userBalanceInfo.entity.UserBalanceInfo;
import com.love.marriage.userBalanceInfo.vo.UserBalanceInfoAddVo;
import com.love.marriage.userBalanceInfo.vo.UserBalanceInfoVo;
import com.love.marriage.userMembershipInfo.vo.UserReduceMoneyVo;

/**
 * 用户余额表 服务类
 * author: mybatisPlus
 * createDate: 2024-10-17 21:19:44
 * description: 我是由代码生成器生成
 * version: 1.0.0
 */
public interface UserBalanceInfoService extends IService<UserBalanceInfo> {

    Page<UserBalanceInfoVo> getPage(Long pageNum, Long pageSize, UserBalanceInfoVo userBalanceInfoVo);

    UserBalanceInfoVo queryUserBalanceInfo(Long id);

    UserBalanceInfoVo queryUserBalanceInfoByUserId(Long userId);

    UserBalanceInfoVo addAmountBack(OrderInfoVo orderInfoVo) throws Exception;

    UserBalanceInfoVo reduceAmount(UserBalanceInfoAddVo userBalanceInfoAddVo, Long relationId,
                                   String transactionType, String message);

    WxPayUnifiedOrderV3Result.JsapiResult reduceMoney(UserReduceMoneyVo userReduceMoneyVo) throws Exception;

    UserBalanceInfoVo addUserBalanceInfo(UserBalanceInfoVo userBalanceInfoVo);

    UserBalanceInfoVo updateUserBalanceInfo(UserBalanceInfoVo userBalanceInfoVo);

    Boolean deleteUserBalanceInfo(String ids);

    Boolean reduceBalanceByType(Long userId, String type) throws Exception;
}
